home *** CD-ROM | disk | FTP | other *** search
/ Ice Princess Press Kit / Ice Princess Press Kit.iso / pc / program.dxr / Internal_52_Flash Navigation Behavior.ls < prev    next >
Encoding:
Text File  |  2005-03-02  |  1.4 KB  |  52 lines

  1. property gowhere, soundMember, soundChannel, loops, pCursorChange, pCursorChoice
  2.  
  3. on getBehaviorDescription me
  4.   return "Rollover,Sound, Marker & Cursor" & RETURN & RETURN & "Just place on Sprite and fill-in Properties"
  5. end
  6.  
  7. on getBehaviorTooltip me
  8.   return "Use with any sprite member."
  9. end
  10.  
  11. on getPropertyDescriptionList me
  12.   xlist = [:]
  13.   addProp(xlist, #gowhere, [#comment: "Navigate to which Frame Label?:", #format: #marker, #default: #bitmap])
  14.   addProp(xlist, #soundMember, [#comment: "Sound to play", #format: #sound, #default: VOID])
  15.   addProp(xlist, #soundChannel, [#comment: "Sound channel", #format: #integer, #default: 3, #range: [1, 2, 3, 4]])
  16.   addProp(xlist, #loops, [#comment: "How many loops:", #format: #integer, #default: 1, #range: [1, 2, 3]])
  17.   addProp(xlist, #pCursorChoice, [#default: 1, #format: #boolean, #comment: "Do you want a cursor change?"])
  18.   addProp(xlist, #pCursorChange, [#format: #cursor, #comment: "Cursor to change to", #default: 280])
  19.   return xlist
  20. end
  21.  
  22. on changeCur
  23.   if pCursorChoice = 1 then
  24.     cursor(pCursorChange)
  25.   else
  26.     cursor(0)
  27.   end if
  28. end
  29.  
  30. on playMySound me
  31.   soundstatus = sound(soundChannel)
  32.   if soundstatus = 4 then
  33.     sound(soundChannel).play()
  34.   else
  35.     sound(soundChannel).play([#member: soundMember, #loopCount: loops])
  36.   end if
  37. end
  38.  
  39. on mouseUp me
  40.   playMySound()
  41.   go(gowhere)
  42.   cursor(0)
  43. end
  44.  
  45. on mouseEnter me
  46.   changeCur()
  47. end
  48.  
  49. on mouseLeave me
  50.   cursor(0)
  51. end
  52.